﻿using System;
class PrintingNumbers
{
    static void Main()
    {
        int number;
        Console.Write("Please input number: ");
        while (true)
        {
            try
            {
                number = int.Parse(Console.ReadLine());
                break;
            }
            catch (Exception)
            {
                Console.Write("This is not a number. Please re-enter: ");
            }
        }
        for (int i = 0; i <= number; i++)
        {
            Console.Write("{0}, ", i);
        }
        Console.ReadLine();
    }
}
